import { Page, Result } from './common';

/**
 * @description: Bimface接口文档中的ProjectDTO
 */
interface Project {
  id: string;
  appKey: string;
  name: string;
  state: string;
  hubId: string;
  tenantCode: string;
  type: string;
  thumbnail: string;
  info: string;
  createTime: string;
  updateTime: string;
}

export interface File {
  id: string;
  fileId: string;
  fileItemId: string;
  name: string;
  fileItemName: string;
  suffix: string | null;
  length: number;
  appKey: string;
  projectId: string;
  parentId: string | null;
  folder: boolean;
  storeId: string | null;
  version: number;
  status: string;
  uploadMode: string | null;
  md5: string | null;
  physicallIndex: string | null;
  createTime: string;
  updateTime: string;
  current: boolean;
  creatorId?: string;
  originalCreatorId?: string;
  creatorName?: string;
  originalCreatorName?: string;
  originalCreateTime: string;
}

export interface CreateProjectData {
  name: string;
  thumbnail?: string;
  info?: string;
}

interface RootFolder extends File {
  path: string;
}

export interface ProjectModel extends Result {
  data: Project;
}
export interface ProjectsArrayModel extends Result {
  data: Project[];
}

export interface FileItemModel extends Result {
  data: File;
}

export interface FileItemArrayModel extends Result {
  data: {
    page: Page;
    list: File[];
  };
}

export interface RootFolderModel extends Result {
  data: RootFolder;
}
